package com.itany.life.userdemo.service.impl;

import com.itany.life.userdemo.dao.PermissionDao;
import com.itany.life.userdemo.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
public class PermissionServiceImpl implements PermissionService {


    @Autowired
    private PermissionDao permissionDao;


    @Transactional(propagation = Propagation.SUPPORTS,readOnly = true)
    @Override
    public List<Map<String, Object>> findNavigation() {
        // return permissionDao.selectRoot();
        return permissionDao.select();
    }
}
